package com.cn.controller.hd;
import java.io .IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cn.controller.BaseServlet;
import com.cn.entity.Activity_entity;
import com.cn.service.backstage_huodong_contlr;


@WebServlet("/hd")
public class hd extends BaseServlet {
	private backstage_huodong_contlr activity;
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		activity = new backstage_huodong_contlr();
		List<Activity_entity> list = activity.getmember();
		int sum=list.size();
		if(sum>3){
			List<Activity_entity> list1=list.subList(0,3);
			List<Activity_entity> list2=list.subList(3, list.size());
			req.setAttribute("list1", list1);
			req.setAttribute("list2", list2);
		}else{
			req.setAttribute("list1", list);
		}
		
		
		forward("hd/hd");
	}
}